package rickyGame.game.action.state
{
	import ricky.game.Actor;
	
	import ricky.game.Actor2D;
	import rickyGame.game.Fighter;
	
	/**
	 * 改变玩家状态
	 * Actor 中所有公开熟悉都可以改变
	 * speed 速度
	 * 
	 * 
	 */
	public class InstalSpeedSateAct extends StateAct
	{
		public function InstalSpeedSateAct(actor:Fighter,speed:Number, endTime:Number)
		{
			super(actor, null, endTime);
			_speed=speed;
		}
		
		override public function begin():void
		{
			Actor2D(actor).speed=Actor2D(actor).speed+_speed;
			super.begin();
		}
		
		override public function end():void
		{
			Actor2D(actor).speed=Actor2D(actor).speed-_speed;
		}
		
		//
		private var _speed:Number;
	}
}